﻿using System;


namespace ExtAspNet.Examples.form
{
    public partial class fileupload : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {

        }


        protected void btnSubmit_Click(object sender, EventArgs e)
        {
            string fileName = DateTime.Now.Ticks.ToString() + "_" + filePhoto.FileName;
            if (filePhoto.HasFile)
            {
                filePhoto.SaveAs(Server.MapPath("~/upload/" + fileName));
            }

            labResult.Text = "<p>用户名：" + tbxUseraName.Text + "</p>" +
                "<p>头像：<img src=\""+ ResolveUrl("~/upload/" + fileName) +"\" /></p>" ;
        }

    }
}